import Vue from 'vue'
import Router from 'vue-router'
import Home from './pages/home'
import Editor from './pages/editor'
import Login from './pages/login'
import Manage from './pages/manage'
import ResetPwd from "./pages/resetPwd.vue"

Vue.use(Router);

export default new Router({
    routes:[
        {
            path:'/',
            name:'home',
            component:Home,
            redirect: '/login',
            meta: {
                title: '智慧管院系统登录'
            },
            children:[
                {
                    path:'/manage',
                    name:'manage',
                    component:Manage,
                    meta: {
                        title: '文章管理'
                    }
                },
           
                {
                    path:'/editor',
                    name:'editor',
                    component:Editor,
                    meta: {
                        title: '发布文章'
                    }
                }
            ]
        },
        {
            path: '/login',
            component: Login,
            meta: {
                title: '智慧管院系统登录'
            }
        },
        {
            path: '/resetPwd',
            component: ResetPwd,
            meta: {
                title: '修改密码'
            }
        }
    ]
})